package com.szh.zx.duoxiancheng.chapter1;
interface Marry{
	void happpMarry();
}
class Target implements Marry{

	@Override
	public void happpMarry() {
		System.out.println("target 结婚了好开心");
	}
}
class Commpany implements Marry{
	private Marry target;

	public Commpany(Marry target) {
		this.target = target;
	}
//	在这里可以对结婚这件事情，进行aop 增强
	@Override
	public void happpMarry() {
		this.target.happpMarry();
	}
}
public class ProxyStatic {
	public static void main(String[] args) {
		Commpany commpany = new Commpany(new Target());
		commpany.happpMarry();
	}
}
